package com.alan.datasync.handler;

import com.alan.datasync.service.IOggKafkaMessageService;
import com.alan.datasync.source.TestSink;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

/**
 * @Author: li_jl
 * @Description: 测试handler
 * @Date: Created in 2020/6/8 10:45 上午
 */
@EnableBinding(TestSink.class)
public class DataSyncHandler {

    @Autowired
    private IOggKafkaMessageService oggKafkaMessageService;

    /**
     * 测试
     *
     * @param payload 消息内容
     */
    @StreamListener(value = TestSink.INPUT_TEST)
    public void receiveLoans(String payload) {
        oggKafkaMessageService.dealMessage(payload);
    }
}
